// 管理员接口
// 
import request from '@/utils/request'

export function list(page, pageNum) {
    return request({
        url: '/admin/admin/list?page='+page+'&limit='+pageNum+'&sort=add_time&order=desc',
        method: 'get',
    })
}
//查询接口
export function sele(page, pageNum,username,) {
    return request({
        url: '/admin/admin/list?page='+page+'&limit='+pageNum+'&username='+username+'&sort=add_time&order=desc',
        method: 'get',
    })
}
//确定提交接口
export function ok(avatar,password,roleIds,username,) {
    return request({
        url: '/admin/admin/create',
        method: 'post',
        data:{
            avatar:avatar,
            password:password,
            roleIds:roleIds,
            username:username,
        },
    })
}
//编辑修改确定接口
export function ok2(avatar,id,password,roleIds,username,) {
    return request({
        url: '/admin/admin/update',
        method: 'post',
        data:{
            avatar:avatar,
            id:id,
            password:password,
            roleIds:roleIds,
            username:username,
        },
    })
}
//删除接口
export function dele(avatar,id,roleIds,username,) {
    return request({
        url: '/admin/admin/delete',
        method: 'post',
        data:{
            avatar:avatar,
            id:id,
            roleIds:roleIds,
            username:username,
        },
    })
}